"""
  created by fanxl on 2018/5/13 18:29
"""
__author__ = 'fanxl'

from . import web

@web.route('/user')
def user():
    return 'ok'


@web.route("/test/<name>")
def test(name):
    # status code 200, 404, 301
    # content-type http headers
    # 默认不指定，content-type = text/html
    headers = {
        'content-type': 'text/plain',
        'location': 'http://www.baidu.com'
    }
    # response = make_response('<html></html>', 301)
    # response.headers = headers
    # return response
    # 下面简写
    return '<html></html>', 301, headers